# vim:set noet ts=4:
#
# ibust - IBus with Traditional interface
#
# Copyright (c) 2013 Daniel Sun
# Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
# Copyright (c) 2007-2010 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA  02111-1307  USA

NULL =

libibust = $(top_builddir)/src/libibust-@IBUST_API_VERSION@.la

component_DATA = \
	gtkpanel.xml \
	$(NULL)
componentdir = $(pkgdatadir)/component

gtkpanel.xml: gtkpanel.xml.in
	$(AM_V_GEN) \
	( \
		libexecdir=${libexecdir}; \
		s=`cat $<`; \
		eval "echo \"$${s}\""; \
	) > $@

INCLUDES = \
	-I$(top_srcdir)/src \
	-I$(top_builddir)/src \
	$(NULL)

USE_SYMBOL_ICON = FALSE

# force include config.h before gi18n.h.
AM_CPPFLAGS = -include $(CONFIG_HEADER)

AM_CFLAGS = \
	@GLIB2_CFLAGS@ \
	@GIO2_CFLAGS@ \
	@GTHREAD2_CFLAGS@ \
	@GTK3_CFLAGS@ \
	@X11_CFLAGS@ \
	$(INCLUDES) \
	-DG_LOG_DOMAIN=\"IBUST\" \
	-DBINDIR=\"$(bindir)\" \
	-DIBUST_DISABLE_DEPRECATED \
	-DSWITCHER_USE_SYMBOL_ICON=$(USE_SYMBOL_ICON) \
	-Wno-unused-variable \
	-Wno-unused-but-set-variable \
	-Wno-unused-function \
	$(NULL)

AM_LDADD = \
	@GOBJECT2_LIBS@ \
	@GLIB2_LIBS@ \
	@GIO2_LIBS@ \
	@GTHREAD2_LIBS@ \
	@GTK3_LIBS@ \
	@X11_LIBS@ \
	-lXi \
	$(libibust) \
	$(NULL)

AM_VALAFLAGS = \
	--vapidir=$(top_builddir)/bindings/vala \
	--vapidir=$(top_srcdir)/bindings/vala \
	--pkg=posix \
	--pkg=gtk+-3.0 \
	--pkg=gdk-x11-3.0 \
	--pkg=ibust-1.0 \
	--pkg=config \
	--pkg=xi \
	$(NULL)

libexec_PROGRAMS = ibust-ui-gtk3

ibust_ui_gtk3_SOURCES = \
	application.vala \
	candidatearea.vala \
	candidatepanel.vala \
	handle.vala \
	iconwidget.vala \
	keybindingmanager.vala \
	panel.vala \
	pango.vala \
	property.vala \
	separator.vala \
	switcher.vala \
	$(NULL)

ibust_ui_gtk3_LDADD = \
	$(AM_LDADD) \
	$(NULL)

CLEANFILES = \
	gtkpanel.xml \
	$(NULL)

EXTRA_DIST = \
	gtkpanel.xml.in.in \
	$(NULL)


-include $(top_srcdir)/git.mk
